home *** CD-ROM | disk | FTP | other *** search
- WBStartup
- WbToScreen 0
- Window 0,0,11,402,125,$1000|$2|$4|$8,"Cheatfinder 3.0 Copyright 1996 Frank Otto",1,2
- GTButton 0,0,15,7,125,14,"Load game",$0010
- GTButton 0,1,151,7,230,14,"View",$0010
- GTCheckBox 0,2,15,27,26,11,"Everything",$0002
- GTInteger 0,3,151,27,125,15,"Cheat length",$0002,5
- GTCheckBox 0,4,15,43,26,11,"Uppercase",$0102
- GTString 0,5,151,49,125,15,"Output file",$0002,99,"Ram:Cheats"
- GTCheckBox 0,6,15,59,26,11,"Lowercase",$0102
- GTString 0,7,151,71,125,15,"Text viewer",$0002,99,"Sys:Utilities/More"
- GTCheckBox 0,8,15,75,26,11,"Numbers",$0102
- GTText 0,9,15,92,366,12,"",$0010,""
- AttachGTList 0,0
-
- Repeat
- comm$=GTGetString(0,7)
- name$=GTGetString(0,5)
- Use Window 0
- ev.l=WaitEvent
- If ev=$40
- If GadgetHit=0 AND GTGetInteger(0,3)>0 AND name$=""=0 Then Gosub loadgame
- If GadgetHit=0 AND name$="" Then GTSetString 0,9,"No output file entered."
- If GadgetHit=0 AND GTGetInteger(0,3)=0 Then GTSetString 0,9,"Cheat length must be over 0."
- If GadgetHit=1
- If Exists(name$) AND name$=""=0 Then Execute_ comm$+Chr$(32)+name$,0,Output_
- If Exists(name$)=0 OR name$="" Then GTSetString 0,9,"File not found."
- EndIf
- EndIf
- Until ev=$200
-
- Free Window 0
- End
-
- loadgame:
- MaxLen pa$=160
- MaxLen fi$=64
- f$=ASLFileRequest$("Load game",pa$,fi$)
- If f$
- If ReadFile(1,f$)
- FileInput 1
- cheatlength=GTGetInteger(0,3)
- If WriteFile(2,name$)
- ScreensBitMap 0,0
- BitMapOutput 0
- GTSetString 0,9,"Searching..."
-
- While NOT Eof(1)
- a$=Edit$(1)
- If Asc(a$)>96 AND Asc(a$)<123 AND GTStatus(0,6)=1 Then Goto le
- If Asc(a$)>64 AND Asc(a$)<91 AND GTStatus(0,4)=1 Then Goto le
- If Asc(a$)>47 AND Asc(a$)<58 AND GTStatus(0,8)=1 Then Goto le
- If Asc(a$)>31 AND GTStatus(0,2)=1 Then Goto le
- FileOutput 2
- If w>=cheatlength Then NPrint w$
-
- w=0
- w$=""
- Goto a
- le:
- w+1
- w$+a$
- a:
- Wend
-
- DefaultOutput
- WindowOutput 0
- GTSetString 0,9,"Ready."
- If Lof(2)=0 Then GTSetString 0,9,"Nothing found."
- CloseFile 1
- CloseFile 2
- EndIf
- EndIf
- EndIf
-
- Return
-
-